﻿using Sustainalytics.ESG.Entities;
using Sustainalytics.SharedEntities.EsgResearch;
using System.Collections.Generic;
using System.Linq;

namespace Sustainalytics.ClientDW.Synchronization.SyncESGData.SubPeerGroupKeyIssueLogic
{
    public class SubPeerGroupKeyIssueMapper
    {
        public SubPeerGroupKeyEsgIssue Map(KeyIssue entity)
        {
            return new SubPeerGroupKeyEsgIssue
            {
                Id = entity.Id,
                SubPeerGroupId = entity.SubPeerGroupId,
                Name = entity.Name,
                Description = entity.Description,
                SortKey = entity.SortKey,
                BussinessImpact = entity.BusinessImpact,
                SustainabilityImpact = entity.SustainabilityImpact,
                ExternalId = entity.ExternalId
            };
        }

        public IList<SubPeerGroupKeyEsgIssue> MapManyToMany(IList<KeyIssue> entities)
        {
            return entities.Select(Map).ToList();
        }
    }
}
